<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        
        function getUrlParam() {
            var url = window.location.search;
            var theRequest = new Object();   
            if (url.indexOf("?") != -1) {   
                var str = url.substr(1);   
                strs = str.split("&");   
                for(var i = 0; i < strs.length; i ++) {   
                    theRequest[strs[i].split("=")[0]]=decodeURI(strs[i].split("=")[1]); 
                }   
            }   
            return theRequest; 

        }
        var x = getUrlParam()
        
        console.log(x.name)
        console.log(x.id)
    </script>
</body>
</html>